package com.chris.libs.example.common.inject;

import com.chris.libs.example.pages.ext.base.BaseExampleActivity;
import com.chris.libs.example.pages.ext.basewidget.BaseWidgetActivity;
import com.chris.libs.example.pages.ext.http.HttpActivity;
import com.chris.libs.example.pages.ext.http2.Http2Activity;
import com.chris.libs.example.pages.common.main.MainActivity;
import com.chris.libs.example.pages.ext.recyclerview.RecyclerViewExampleActivity;
import com.chris.libs.example.pages.ext.smartrefresh.SmartRefreshActivity;
import com.chris.libs.example.pages.ext.styles.button.ButtonActivity;
import com.chris.libs.example.pages.ext.styles.edittext.EditTextActivity;
import com.chris.libs.example.pages.ext.swiperefresh.SwipeRefreshActivity;
import com.chris.libs.example.pages.ext.widget.material.MaterialActivity;
import com.chris.libs.example.pages.ext.widget.normal.NormalActivity;
import com.chris.libs.example.pages.tabs.main.base.BaseFrameworkFragment;
import com.chris.libs.example.pages.tabs.main.devtools.DevToolsFragment;
import com.chris.libs.example.pages.tabs.main.home.HomeFragment;
import com.chris.libs.example.pages.tabs.main.style.StyleFragment;
import com.chris.libs.example.pages.tabs.main.widget.WidgetFragment;

import javax.inject.Singleton;

import dagger.Component;

/**
 * @author Chris chan
 * Create on： 2025/2/1 9:56
 * Use for: Dagger注入管理
 * Explain:
 */
// 有Module使用单例
@Singleton
@Component(modules = {AppModule.class})
public interface AppComponent {
    //================Activity=================
    void inject(MainActivity activity);

    void inject(BaseExampleActivity activity);

    void inject(RecyclerViewExampleActivity activity);

    void inject(HttpActivity activity);
    void inject(Http2Activity activity);

    void inject(ButtonActivity activity);
    void inject(EditTextActivity activity);

    void inject(SwipeRefreshActivity activity);
    void inject(SmartRefreshActivity activity);

    void inject(BaseWidgetActivity activity);
    void inject(NormalActivity activity);
    void inject(MaterialActivity activity);


    //================Fragment=================
    void inject(HomeFragment fragment);

    void inject(BaseFrameworkFragment fragment);

    void inject(StyleFragment fragment);

    void inject(DevToolsFragment fragment);

    void inject(WidgetFragment fragment);
}
